<layout name='Layout/ace_layout' />
{:W('PageHeader',array('name'=>'工作日报','search'=>'M'))}
<form method="post" name="form_adv_search" id="form_adv_search">
	<div class="adv_search panel panel-default  display-none"  id="adv_search">
		<div class="panel-heading">
			<div class="row">
				<h4 class="col-xs-6">高级搜索</h4>
				<div class="col-xs-6 text-right">
					<a  class="btn btn-sm btn-info" onclick="submit_adv_search();">搜索</a>
					<a  class="btn btn-sm " onclick="close_adv_search();">关闭</a>
				</div>
			</div>
		</div>
		<div class="panel-body">
			<eq name="auth.admin" value="true">
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="eq_dept_id">部门：</label>
					<div class="col-sm-8">
						<select class="form-control" name="eq_dept_id">
							<option value="">选择部门</option>
							{$dept_list}
						</select>
					</div>
				</div>
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="eq_user_id">登录人：</label>
					<div class="col-sm-8">
						<select class="form-control" name="eq_user_id" >
							<option value="">选择人员</option>
							{:fill_option($emp_list)};
						</select>
					</div>
				</div>
			</eq>
			<div class="form-group col-sm-6">
				<label class="col-sm-4 control-label" for="content">内容：</label>
				<div class="col-sm-8">
					<input  class="form-control" type="text" id="content" name="content" >
				</div>
			</div>
			<div class="form-group col-sm-6">
				<label class="col-sm-4 control-label" for="be_create_time">登录时间：</label>
				<div class="col-sm-8">
					<div class="input-daterange input-group" >
						<input type="text" class="input-sm form-control text-center" name="be_create_time" />
						<span class="input-group-addon">-</span>
						<input type="text" class="input-sm form-control text-center" name="en_create_time" />
					</div>
				</div>
			</div>
		</div>
	</div>
</form>
<div class="operate panel panel-default">
	<div class="panel-body">
		<div class="pull-right">
			<a class="btn btn-sm btn-primary" onclick="add()">新建</a>
		</div>
	</div>
</div>
<div class="ul_table">
	<ul>
		<li class="thead">
			<div class="pull-left">
				<span class="col-10">部门</span>
				<span class="col-10">登录人</span>
				<span class="col-10">职责</span>
				<span class="col-10">日期</span>
			</div>
			<div class="pull-right">
				<span class="col-10">状态</span>
				<span class="col-8">操作</span>
			</div>
		</li>
		<empty name="list">
			<li class="no-data">
				没找到数据
			</li>
			<else/>
			<form method="post" action="" id="form_data">
				<foreach name="list" item="vo">
					<li class="tbody">
						<div class="pull-left">
							<span class="col-10">{$vo.dept_name}</span>
							<span class="col-10">{$vo.user_name}</span>
							<span class="col-10">{$vo.user_id|get_position_name}</span>
							<span class="col-10"><a href="{:U('read','id='.$vo['id'])}">{$vo.work_date}</a></span>
						</div>
						<div class="pull-right">
							<span class="col-10">{$vo.is_submit|is_submit}</span>
							<if condition="($vo['is_submit'] eq 0) and ($vo.user_id eq $user_id)">
								<span class="col-4"><a href="{:U('edit','id='.$vo['id'])}">修改</a></span>
								<span class="col-4"><a href="{:U('del','id='.$vo['id'])}">删除</a></span>
							<else/>
								<span class="col-8"></span>
							</if>
						</div>
					</li>
				</foreach>
			</form>
			<div class="pagination">
				{$page}
			</div>
		</empty>
	</ul>
</div>